#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
void main()
{
	int a, i,f,e, j;
	char b[12];
	int atoi(const char *s);
	clrscr();

	printf("\n\n\t\t\tTo Stop Press ESC");
	printf("\n\n\t\tEnter the numeric value:");

	while(1)                                            atoi
	{
		window(40, 5+i, 80, 25);
		a = getche();
		if(a == 27)
		{
			break;
		}
		if(a >= 48 && a <= 57)
		{
			printf("   Numeric Number");
			b[i] = a;
			 i++;//f = f * i;
		}
		else
		{
			printf("   Invalid No.");
		}

		if(i > 11)//User value is counted by i & it starts from from Zero.
		{
			break;
		}
	}
	printf("\n\n\tFactorial Value is: ");

	for(j = 0; j < i; j++)
	{
		e = f;
		f = f * i;
		printf("%d ", f);//b[j]);
	}
	getch();

}